let s = {}

s.activityType = function (row, column) {
    return row.activityType == 0 ? '会员拉新' : row.activityType == 1 ? '会员关怀' : row.activityType == 2 ? '门店折扣' : row.activityType == 3 ? '满折' : row.activityType == 4 ? '满减' : row.activityType == 5 ? '单品变价' : '未知'
}

s.activityState = function (row, column) {
    return row.activityState == 0 ? '未开始' : row.activityState == 1 ? '进行中' : row.activityState == 2 ? '已结束' : '未知'
}

s.ticketType = function (row, column) {
    return row.ticketType == 0 ? '体验券' : row.ticketType == 1 ? '满减券' : row.ticketType == 2 ? '买折券' : row.ticketType == 3 ? '买赠券' : row.ticketType == 4 ? '折扣券' : '未知'
}
s.transactionType = function (row, column) {
    return row.transactionType == 0 ? '采购' : row.transactionType == 1 ? '退货退款' : row.transactionType == 2 ? '提现' : '未知'
}
s.activityAuditState = function (row, column) {
    return row.activityAuditState == 0 ?
        '未提交' :
        row.activityAuditState == 1 ?
            '未审核' :
            row.activityAuditState == 2 ?
                '审核通过' :
                row.activityAuditState == 3 ?
                    '审核驳回' :
                    row.activityAuditState == 4 ?
                        '已撤回' :
                        '未知'
}

s.status = function (row, column) {
    return row.status == 0 ? '启用' : row.status == 1 ? '停用' : '未知'
}

s.Pricestatus = function (row, column) {
    return Number(row.status) === 0 ?
        '已生效' :
        Number(row.status) === 1 ?
            '已失效' :
            Number(row.status) === 2 ?
                '已取消' :
                Number(row.status) === 3 ?
                    '未生效' :
                    ' '
}

s.statuss = function (row, column) {
    return row.status == 0 ? '未使用' : row.status == 1 ? '已使用' :row.status == 2 ?  '已过期':' '
}

s.shelf = function (row, column) {
    return row.status == 0 ? '上架' : row.status == 1 ? '下架' : '未知'
}

s.isEdit = function (row, column) {
    return Number(row.isEdit) === 0 ?
        '不可修改' :
        Number(row.isEdit) === 1 ?
            '可修改' :
            '未知'
}

s.service = function (row, column) {
    return row.statue == 0 ?
        '全部' :
        row.statue == 1 ?
            '商品售卖' :
            row.statue == 2 ?
                '服务售卖' :
                row.statue == 3 ?
                    '计次卡' :
                    '未知'
}

s.inStatus = function (row, column) {
    return row.inStatus == 0 ? '未入库' : row.inStatus == 1 ? '已入库' : '未知'
}

s.outStatus = function (row, column) {
    return row.outStatus == 0 ? '未出库' : row.outStatus == 1 ? '已出库' : '未知'
}
s.inType = function (row, column) {
    return row.inType == 0 ?
        '其它入库' :
        row.inType == 1 ?
            '收货入库' :
            row.inType == 2 ?
                '盘盈入库' :
                row.inType == 3 ?
                    '调拨入库' :
                    row.inType == 4 ?
                        'POS退货入库' :
                        row.inType == 5 ?
                            '期初入库' :
                            row.inType == 6 ?
                                '退货入库' :
                                '未知'
}
s.auditStatus = function (row, column) {
    return row.auditStatus == 0 ?
        '未审核' :
        row.auditStatus == 1 ?
            '审核通过' :
            row.auditStatus == 2 ?
                '审核驳回' :
                '未知'
}
s.outType = function (row, column) {
    return row.outType == 0 ?
        '其它出库' :
        row.outType == 1 ?
            '销售出库' :
            row.outType == 2 ?
                '盘亏出库' :
                row.outType == 3 ?
                    '调拨出库' :
                    row.outType == 4 ?
                        'POS销售出库' :
                        row.outType == 5 ?
                            '报损出库' :
                            row.outType == 6 ?
                                '退货出库' :
                                '未知'
}
s.fenlei = function (row, column) {
    return row.type == 0 ? '文章' : row.type == 1 ? '视频' : '未知'
}
s.recharge = function (row, column) {
    return row.type == 1 ? '充值' : row.type == 2 ? '消费' : '未知'
}
s.recharges = function (row, column) {
    return row.dealType == 0 ?
        '充值' :
        row.dealType == 1 ?
            '付款' :
            row.dealType == 2 ?
                '提现' :
                row.dealType == 3 ?
                    '转账' :
                    row.dealType == 4 ?
                        '返现' :
                        row.dealType == 5 ?
                            '退款' :
                            '未知'
}
s.category = function (row, column) {
    return row.isAll == 0 ?
        '全品类使用' :
        row.isAll == 1 ?
            '否全品类使用' :
            '未知'
}
s.categorys = function (row, column) {
    return row.isAll == 0 ?
        '部分商品' :
        row.isAll == 1 ?
            '全部商品' :
            row.isAll == 2 ?
                '全部服务' :
                row.isAll == 3 ?
                    '部分服务' :
                    '未知'
}
s.genre = function (row, column) {
    return row.resource == 0 ? '单选' : row.resource == 1 ? '多选' : '未知'
}
s.consig = function (row, column) {
    return row.shipmentsStats == 301 ?
        '未发货' :
        row.shipmentsStats == 303 ?
            '已发货' :
            '未知'
}
s.whether = function (row, column) {
    return row.state == 0 ? '是' : row.state == 1 ? '否' : '未知'
}
s.sex = function (row, column) {
    return row.gender == '0' ? '男士' : row.gender == '1' ? '女士' : '未知'
}
s.babyGender = function (row, column) {
    return row.babyGender == '0' ? '男' : row.babyGender == '1' ? '女' : '未知'
}
s.yytime = function (row, column) {
    return row.DiurnalJunctions == 0 ?
        '当天' :
        row.DiurnalJunctions == 1 ?
            '第二天' :
            '未知'
}
s.audit = function (row, column) {
    return row.auditStatus == 0 ?
        '未审核' :
        row.auditStatus == 1 ?
            '审核通过' :
            '审核驳回'
}
s.busin = function (row, column) {
    return row.businessStatus == 0 ?
        '建店' :
        row.businessStatus == 1 ?
            '营业' :
            '停业'
}
s.integral = function (row, column) {
    return row.resource == 0 ?
        '手动积分' :
        row.resource == 1 ?
            '自动积分' :
            '未知'
}
s.paytype = function (row, column) {
    return row.payType == 0 ?
        '---' :
        row.payType == 1 ?
            '微信支付' :
            row.payType == 2 ?
                '支付宝' :
                row.payType == 3 ?
                    '余额' :
                    '未知'
}
s.payState = function (row, column) {
    return row.status == 0 ?
        '待付款' :
        row.status == 1 ?
            '已付款' :
            row.status == 2 ?
                '已完成' :
                row.status == 3 ?
                    '已取消' :
                    '未知'
}
s.orderState = function (row, column) {
    return row.status == 0 ?
        '待审核' :
        row.status == 1 ?
            '已审核' :
            row.status == 2 ?
                '财务待审核' :
                row.status == 3 ?
                    '待发货' :
                    row.status == 4 ?
                        '已发货' :
                        row.status == 5 ?
                            '待入库' :
                            row.status == 6 ?
                                '已入库' :
                                row.status == 7 ?
                                    '已完成' :
                                    row.status == 8 ?
                                        '已驳回' :
                                        row.status == 9 ?
                                            '财务驳回' :
                                            '未知'
}
s.purchaseStatus = function (row, column) {
    return row.purchaseStatus == 0 ?
        '未生成' :
        row.purchaseStatus == 1 ?
            '已生成' :
            '未知'
}

s.tradeType = function (row, column) {
    return row.tradeType == "PRE_RECHARGE" ? '预付款充值' : row.tradeType == "PRE_RETURN" ? '预付款退款' : row.tradeType == "PRE_COMMODITY_PURCHASE" ? '商品采购' : row.tradeType == "PRE_COMMODITY_RETURN" ? '商品退款' : row.tradeType == "PRE_INIT" ? '初始值' : '未知'
}
s.shopTypeStatus = function (row, column) {
    return row.status == 0 ? '直营' : row.status == 1 ? '加盟' : '未知'
}
s.shopType = function (row, column) {
    return row.shopType == 0 ? '直营' : row.shopType == 1 ? '加盟' : row.shopType == 2 ? '联营' : ' '
}
s.cardStutas = function (row, column) {
    return row.ticketState == 0 ? '未过期' : row.ticketState == 1 ? '已过期' : '未知'
}
s.openAccount = function (row, column) {
    return row.openAccount == 0 ?
        '未开户' :
        row.openAccount == 1 ?
            '已开户' :
            '未知'
}
s.saleStatusArray = [{
    label: '全部',
    value: ''
},
{
    label: '已生成',
    value: '0'
},
{
    label: '已取消',
    value: '1'
},
{
    label: '已关闭',
    value: '2'
},
{
    label: '已确认',
    value: '3'
}, {
    label: '已取消',
    value: '4'
}, {
    label: '已关闭',
    value: '5'
}
]
s.saleStatusArraynew = [{
    label: '全部',
    value: ''
},
{
    label: '已生成',
    value: '0'
},
{
    label: '已取消',
    value: '1'
},
{
    label: '已关闭',
    value: '2'
},
{
    label: '已确认',
    value: '3'
}, {
    label: '已取消(对方)',
    value: '4'
}, {
    label: '已关闭(对方)',
    value: '5'
}
]
s.deliveryStatusArray = [{
    label: '全部',
    value: ''
},
{
    label: '未清',
    value: '0'
},
{
    label: '已清',
    value: '1'
},
    // {
    //     label: '未确认',
    //     value: '2'
    // },
    // {
    //     label: '已确认',
    //     value: '3'
    // }
]
s.paymentStatusArray = [{
    label: '全部',
    value: ''
},
{
    label: '未收款',
    value: '0'
},
{
    label: '已收款',
    value: '1'
},
{
    label: '已退款',
    value: '2'
},
{
    label: '退款申请中',
    value: '3'
},
]
s.saleFromArray = [{
    label: '全部',
    value: ''
},
{
    label: '报货协同生成',
    value: '0'
},
{
    label: '自建',
    value: '1'
},
{
    label: '采购',
    value: '2'
}
]
s.retailStatus = function (row, column) {
    return row.retailState == 0 ?
        '不可零售' :
        row.retailState == 1 ?
            '可零售' :
            '未知'
}
s.purchaseStatusArrs = ['已生成', '已取消', '已关闭', '已确认', '已取消', '已关闭',]
s.saleStatusArrs = ['已生成', '已取消', '已关闭']
s.deliveryStatusArr = ['未清', '已清', '未确认', '已确认']
s.paymentStatusArr = ["未付款", "未付款", "未付款", "已付款"] //采购 付款状态
s.saleFromArr = ['报货协同生成', '自建', '采购']
s.auditStatusArr = ['未审核', '已提交', '已审核', '已驳回'] //采购审核状态
s.jointStatusArr = ['已协同', '未协同']
s.invoiceStatusArr = ['已生成', '已退货', '已开票']
s.invoiceFromArr = ['销售订单', '自建']
s.paymentStatusArrs = ['未退款', '已退款']
s.orderStatusArr = ['已生成', '待审核', '已驳回', '待确认', '已取消', '待付款', '待收货', '已关闭', '已清', '销售方取消单据', '销售方关闭单据', '待发货'] //采购，报货订单状态
s.orderSaleStatusArr = ['待确认', '待收款', '已取消', '待发货', '已关闭', '已清', '采购方取消订单', '采购方关闭订单', '待收货', '待审核', " ", "审核驳回"] //销售订单状态
s.saleReceivingsStatusArr = ['未收货', '已收货', '已退货'] //销售出库单发货状态
s.purchaseReceivingsStatusArr = ['已审核', '待审核', '已退货', '已驳回'] //收货入库单收货状态
s.returnStatusArr = ['已生成', '未同意', '待发货', '待收货', '待退款', '已完成'] //退货订单状态
s.payStatus = function (row, column) {
    switch (row.payStatus) {
        case 0:
            return '未收款'
        case 1:
            return '已收款'
        case 2:
            return '已退款'
        case 3:
            return '退款申请中'
        case 4:
            return '已收款'
        default:
            return '未知'
    }
}
s.receivedStatus = function (row, column) {
    return row.receivedStatus == 0 ? '未清' : row.receivedStatus == 1 ? '已清' : '未知'
}
s.saleType = function (row, column) {
    return row.saleType == 0 ? '报货协同生成' : row.saleType == 1 ? '自建' : row.saleType == 2 ? '采购协同生成' : '未知'
}
s.purchase = function (row, column) {
    return row.purchaseStatus == 0 ? '已生成' : row.purchaseStatus == 1 ? '已取消' : row.purchaseStatus == 2 ? '已关闭' : row.purchaseStatus == 3 ? '已确认' : row.purchaseStatus == 4 ? '已取消' : row.purchaseStatus == 5 ? '已关闭' : '未知'
}
s.states = function (row, column) {
    return row.state == 0 ? '上架' : row.state == 1 ? '下架' : '未知'
}
// 转分类
s.fenlei = function (row, column) {
    return row.type == 0 ? '文章' : row.type == 1 ? '视频' : '未知'
}
s.goodsType = function (row, column) {
    return row.goodsType == 0 ? '商品' : row.goodsType == 1 ? '计次卡' : row.goodsType == 2 ? '服务' : '未知'
}
s.orderTypes = function (row, column) {
    return row.orderType == 0 ? '售卖' : row.orderType == 1 ? '退货' : '未知'
}

s.advPosition = function (row, column) {
    return row.position == 0 ? '首页轮播图' : row.position == 1 ? '课堂轮播图' : row.position == 2 ? 'TV视频' : '其他位置'
}
s.courseType = function (row) {
    switch (row.courseType) {
        case 0:
            return '宝宝喂养'
        case 1:
            return '宝宝辅食'
        case 2:
            return '疾病护理'
        case 3:
            return '学前教育'
        case 4:
            return '宝贝去哪'
        default:
            return '未知'
    }
}
s.courseClassify = function (row) {

    switch (row.dataType) {
        case 0:
            return '图文'
        case 1:
            return '音频'
        case 2:
            return '专辑'
        default:
            return '未知'
    }
}

s.classStatus = function (row) {
    return row.status == 0 ? '已保存' : row.status == 1 ? '已发布' : '已下架'
}
s.inventoryType = function (row, column) {
    return row.inventoryType == 0 ? '日盘' : row.inventoryType == 1 ? '周盘' : row.inventoryType == 2 ? '月盘' : '未知'
} //盘点类型
s.inventoryStatus = function (row, column) {
    return row.inventoryStatus == 0 ? '未开始' : row.inventoryStatus == 1 ? '进行中' : row.inventoryStatus == 2 ? '未审核' : row.inventoryStatus == 3 ? '审核通过' : row.inventoryStatus == 4 ? '审核驳回' : '未知'
} //盘点状态
//应收应付
s.paymentType = function (row) { //付款类型
    return row.paymentType == 1 ? '采购付款' : row.paymentType == 2 ? '退货付款' : '未知'
}
s.paymentTypes = function (row) { //收款类型
    return row.paymentType == 1 ? '销售收款' : row.paymentType == 2 ? '退货收款' : '未知'
}
s.lastPayType = function (row) { //支付方式
    return row.lastPayType == 1 ? '线下支付' : row.lastPayType == 2 ? '在线支付' : row.lastPayType == 3 ? '预付款支付' : '未知'
}
s.paymentStatus = function (row) { //支付状态
    return row.paymentStatus == 0 ? '未付' : row.paymentStatus == 1 ? '待确认' : row.paymentStatus == 2 ? '部分支付' : row.paymentStatus == 3 ? '已付' : '未知'
}
s.isMultiple = function (row) { //付款类型
    return row.isMultiple == 0 ? '否' : row.isMultiple == 1 ? '是' : '未知'
}
s.orderType = function (row) { //订单类型
    return row.orderType == 0 ? '其他' : row.orderType == 1 ? '自建' : '未知'
}
s.auditing = function (row) { //审核状态
    return row.status == 0 ? '失败' : row.status == 1 ? '成功' : row.status == 2 ? '审核中' : row.status == 3 ? '撤回' : '未知'
}
s.payment = function (row) { //类型
    return row.type == 1 ? '支付' : row.type == 2 ? '退款' : '未知'
}
s.payTypes = function (row) { //支付方式
    return row.payType == 1 ? '线下支付' : row.payType == 2 ? '在线支付' : row.payType == 3 ? '预付款支付' : '未知'
}
s.activityAuditState = function (row) {
    switch (row.activityAuditState) {
        case 0:
            return '未提交'
        case 1:
            return '待审核'
        case 2:
            return '审核通过'
        case 3:
            return '审核驳回'
        case 4:
            return '已撤回'
        default:
            return '未知'
    }
} // 门店活动审核状态
s.activityState = function (row) {
    switch (row.activityState) {
        case 0:
            return '未开始'
        case 1:
            return '进行中'
        case 2:
            return '已结束'
        case 3:
            return '已下线'
        default:
            return '未知'
    }
} //门店活动状态

// 资讯分类
s.informationClassify = function (row) {
    return row.classify == 0 ? '婴儿游泳' : row.classify == 1 ? '产后康复' : row.classify == 2 ? '儿童推拿' : '未知'
}
s.isRecommend = function (row) {
    return row.isRecommend == 0 ? '已推荐' : row.isRecommend == 1 ? "未推荐" : "未知"
}
s.agreementStatusList = ['待确认', '已拒绝', '未生效', '已生效', '已过期'] //协议状态
s.agreementTypeList = ['自建', '同步'] //协议类型
s.noticeStatus = function (row) {

    switch (row.status) {
        case 0:
            return '待上架'
        case 1:
            return '已上架'
        case 2:
            return '已下架'
        default:
            return '未知'
    }
}
s.noticeType = function (row) {
    return row.position == 3 ? '门店活动' : row.position == 4 ? "主推商品" : "未知"
}
s.enrolStatus = function (row) {
    return row.status == 0 ? '审核中' : row.status == 1 ? '审核通过' : row.status == 2 ? '审核拒绝' : '未知'
}
s.enrolStatus = function (row) {
    return row.status == 0 ? '审核中' : row.status == 1 ? '审核通过' : row.status == 2 ? '审核拒绝' : '未知'
}
//  是否提成
s.isCommission = function (row) {
    return row.isCommission == '0' ? '是' : row.isCommission == '1' ? '否' : '--'
}
// 提成方式
s.commissionWay = function (row) {
    return row.commissionWay == '0' ? '比例提成' : row.commissionWay == '1' ? '固定提成' : '--'
}

s.sourceList = function (row) {
    return row.source == 0 ? '婴联邦APP' : row.source == 1 ? '收银一体机' : row.source == 2 ? '圣旦i宝贝' : row.source == 3 ? '会员小程序' : '未知'
}
s.sourceLists = ["婴联邦APP", "收银一体机", "圣旦i宝贝", "会员小程序"]

s.activitySource = function (row) {
    return row.activitySource == 0 ? '自主创建' : row.activitySource == 1 ? '下级自建' : row.activitySource == 2 ? '上级分配' : '未知'
}
s.orderTypelist = function (row, column) {
    return row.orderType == 1 ? '商品售卖' : row.orderType == 2 ? '计次卡售卖' : row.orderType == 3 ? '服务订单' : row.orderType == 4 ? '退货订单' : row.orderType == 5 ? '积分兑换' : '未知'
}

s.channel = function (row, column) {//优惠券获取渠道
    return row.channel == 0 ? '活动下发' : row.channel == 1 ? '优惠券直发' : '未知'
}
s.examScoreData = function (row, column) {//成绩
    return row.examScore == 0 ? '不合格' : row.examScore == 1 ? '合格' : '未知'
}
s.certType = function (row, column) {//报名类型
    return row.certificateType == 0 ? '母婴照护指导' : '未知'
}
s.cerPayType = function (row, column) {//报名类型
    return row.payType == 0 ? '微信' : row.payType == 1 ? '支付宝': '未知'
}
s.certTypeArr=['母婴照护指导']
export default s
